<%@language=vbscript codepage=936 %>
<%
Option Explicit

Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"

Dim ProductID, sql, rs, Hits
%>
<!--#include file="../conn.asp"-->
<!--#include file="../Include/PW_Common_Security.asp"-->
<%
Call OpenConn
ProductID = PE_CLng(GetUrl("ProductID"))
If ProductID = 0 Then
	Hits = 0
Else
	sql = "select Hits from PW_Product where ProductID=" & ProductID
	Set rs = server.CreateObject("ADODB.recordset")
	rs.open sql, Conn, 1, 3
	If rs.bof And rs.EOF Then
		Hits = 0
	Else
		Hits = rs(0) + 1
		rs(0) = Hits
		rs.Update
	End If
	rs.Close
	Set rs = Nothing
End If
Response.Write "document.write('" & Hits & "');"
Call CloseConn
%>